package com.dgh.school.controller;

import com.dgh.school.common.R;
import com.dgh.school.service.MaillstServuce;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MaillistController {
    @Autowired
    private MaillstServuce maillstServuce;
    @RequestMapping("/maillist")
    public R selectByPage(int pageNum, int pageSize){
        try {
            return maillstServuce.selectByPage(pageNum,pageSize);
        } catch (Exception e) {
            return R.error();
        }
    }

}
